package com.watercube.service.base.impl;

import java.util.List;

import com.watercube.dao.BaseDao;
import com.watercube.service.base.BaseService;

public class BaseServiceImpl<T, K, X> implements BaseService<T, K, X> {

	private BaseDao<T, K, X> baseDao;

	public void setBaseDao(BaseDao<T, K, X> baseDao) {
		this.baseDao = baseDao;
	}

	@Override
	public long countByExample(X example) {
		return baseDao.countByExample(example);
	}

	@Override
	public int deleteByExample(X example) {
		return baseDao.deleteByExample(example);
	}

	@Override
	public int deleteByPrimaryKey(K clientId) {
		return baseDao.deleteByPrimaryKey(clientId);
	}

	@Override
	public int insert(T record) {
		return baseDao.insert(record);
	}

	@Override
	public int insertSelective(T record) {
		return baseDao.insertSelective(record);
	}

	@Override
	public List<T> selectByExample(X example) {
		return baseDao.selectByExample(example);
	}

	@Override
	public T selectByPrimaryKey(K clientId) {
		return baseDao.selectByPrimaryKey(clientId);
	}

	@Override
	public int updateByExampleSelective(T record, X example) {
		return baseDao.updateByExampleSelective(record, example);
	}

	@Override
	public int updateByExample(T record, X example) {
		return baseDao.updateByExample(record, example);
	}

	@Override
	public int updateByPrimaryKeySelective(T record) {
		return baseDao.updateByPrimaryKeySelective(record);
	}

	@Override
	public int updateByPrimaryKey(T record) {
		return baseDao.updateByPrimaryKey(record);
	}

}
